package com.example.testapp.activity.activity.read;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import com.example.testapp.R;

/**
 * Created by l on 2016/7/31.
 */
public class ViewTestActivity extends AppCompatActivity {

    private Intent mIntent;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_view_test);
        mIntent = new Intent(this, MyViewTestActivity.class);
        initView();
    }

    private void initView() {
        findViewById(R.id.btnTeaching).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mIntent.putExtra("flag", 0);
                startActivity(mIntent);
            }
        });

        findViewById(R.id.btnTopBar).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                  startActivity(new Intent(ViewTestActivity.this, TopBarTestActivity.class));
            }
        });

        findViewById(R.id.btnMyTextView).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mIntent.putExtra("flag", 1);
                startActivity(mIntent);
            }
        });

        findViewById(R.id.btnShineTextView).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mIntent.putExtra("flag", 2);
                startActivity(mIntent);
            }
        });

        findViewById(R.id.btnCircleProgress).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mIntent.putExtra("flag", 3);
                startActivity(mIntent);
            }
        });

        findViewById(R.id.btnVolumeView).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mIntent.putExtra("flag", 4);
                startActivity(mIntent);
            }
        });

        findViewById(R.id.btnMyScrollView).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mIntent.putExtra("flag", 5);
                startActivity(mIntent);
            }
        });
    }
}
